-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(tests/cpu-monitor): use psutil.Process for threads to fix errors #5385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(tests/cpu-monitor): use psutil.Process for threads to fix errors #5385
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5385 +/- ##
==========================================
+ Coverage 82.31% 82.35% +0.04%
==========================================
Files 265 265
Lines 30645 30645
==========================================
+ Hits 25224 25238 +14
+ Misses 5421 5407 -14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
A/B run to verify this doesn't happen again on A/B: https://buildkite.com/firecracker/performance-a-b-tests/builds/678/steps/canvas |
000a8f5
to
5eef763
Compare
The previous fix didn't work because the read can also return ProcessLookupError. There is also the issue of pid recycling. For this reason, use a single psutil.Process to verify the process still exists, and catch any exception just in case. Signed-off-by: Riccardo Mancini <[email protected]>
5eef763
to
6f3f117
Compare
Pushed new revision. New A/B to test the change: https://buildkite.com/firecracker/performance-a-b-tests/builds/679/steps/canvas |
Changes
Use a single psutil.Process to verify the process still exists, and extend it with better support for threads using psutil.Process to retrieve their information.
Reason
The previous fix didn't work because the read can also return
ProcessLookupError
. There is also the issue of pid recycling.Testing
Example:
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
tools/devtool checkbuild --all
to verify that the PR passesbuild checks on all supported architectures.
tools/devtool checkstyle
to verify that the PR passes theautomated style checks.
how they are solving the problem in a clear and encompassing way.
in the PR.
CHANGELOG.md
.Runbook for Firecracker API changes.
integration tests.
TODO
.rust-vmm
.